<?
include "../include/database.php";

//listview van alle klanten
if($_GET['list'])
{
	echo "<title>Admin, list facturen.</title>";
	?>
        <table width="%" border="0">
		<tr>
			<td width="10%"><b>Nr</b></td>
			<td width="45%"><b>Omschrijving</b></td>
			<td width="15%"><b>bedrag</b></td>
			<td width="15%"><b>Status</b></td>
            <td width="25%"><b></b></td>
		</tr>
		<tr>
			<td colspan="5"><hr size="1" width="100%"></td>
		</tr>
		<?
		$query = mysql_query("SELECT * FROM factuur"); 
		while($result = mysql_fetch_object($query))
		{
		?>
		<tr>
			<td><? print $result->id; ?></a></td>
			<td><? print $result->omschrijving; ?></td>
			<td><? print $result->bedrag; ?></td>
			<td><? print $result->status; ?></td>
         
			<td>
				<a href="admin_article.php?edit=1&id=<? print $result->id; ?>">
				<img src="../images/edit.jpg" border="0"></a> 
				<a href="admin_article.php?deleteclick=1&id=<? print $result->id; ?>" onClick="return confirm('Wilt u zeker deze artikel verwijderen?')">
				<img src="../images/delete.jpg" border="0"></a>
			</td>
		</tr>
        
		<?
		}
		$result = mysql_num_rows($query);  
		if(!$result)
		{
		?>
		<tr>
			<td colspan="5">Geen artikelen.</td>
		</tr>
		<?
		}
		?>
	</table>
	<?
}
?>